<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    <script>
        let ul1 = document.getElementsByTagName('ul')
        let ul2 = document.querySelectorAll('ul')

        let li1 = document.getElementsByTagName('ul')//5
        let li2 = document.querySelectorAll('ul')//5  静态

        // 插入新的li

        ul1[0].appendChild(document.createElement('li'))


        console.log(li1);
        console.log(li2);
        
    </script>
</body>
</html>